Post

Replies

Boosts

Views

Activity

Reply to How to fix the Core Data / SwiftUI 2.0 template in Xcode 12
Hi there, If you add a new navigation view and a new horizontal stack view in the body then you can solve the blank screen issue with an ease. Here goes the code: var body: some View {         NavigationView { // NEW             List {                 ForEach(items) { item in                     Text("Item at \(item.timestamp!, formatter: itemFormatter)")                 }                 .onDelete(perform: deleteItems)             }             .toolbar {                 HStack { // NEW                   #if os(iOS)                     EditButton()                   #endif                   Button(action: addItem) {                       Label("Add Item", systemImage: "plus")                   }               } //: HSTACK           }       } //: NAVIGATION } This can fix this problem until engineers in Cupertino updates this Core Data template. Until then happy coding!
Dec ’20